package com.gxa.bus.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author thinknovo
 * @version 1.0
 * @description ConfigClientBusController.java
 * @date 2021/3/11 15:54
 */
@RefreshScope
@RestController
public class ConfigClientBusController {
    // 注入远程仓库中的配置属性对应的值
    @Value("${username}")
    String username;

    @RequestMapping(value = "/getUsername")
    public String getUsername(){
        return "获取配置信息：" + username;
    }
}
